import QtQuick 2.0

Rectangle {
    id:m_eye

    property bool flag: true;

    onFlagChanged: {
        visible = flag;
    }

    function changeColor(value) {
        var colorStr = "#";
        var num = value * 255;
        var mid = Math.trunc(num).toString(16);
        if (mid.length === 1) {
            mid = "0" + mid;
        }
        colorStr += mid;
        colorStr += "C7EDCC"
        m_eye.color = colorStr;
    }

    function isShow(flag) {
        m_eye.visible = flag;
    }

    // ARGB,alpha should under b2
    color: "#BBC7EDCC"
    anchors.fill: parent;
}
